#include"heap.h"

int main()
{
	HP hp;
	HpInit(&hp);
	HpDataType arr[] = { 21,141,41,1,1,42,9 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	for (int i = 0; i < sz; i++)
	{
		Hppush(&hp, arr[i]);
	}
	for (int i = 0; i < hp.size; i++)
	{
		printf("%d ", hp.a[i]);
	}
	printf("\n");
	printf("%d", hp.a[Hptop(&hp)]);
	printf("\n");
	Hppop(&hp);
	Hppop(&hp);
	Hppop(&hp);
	Hppop(&hp);
	Hppop(&hp);
	for (int i = 0; i < hp.size; i++)
	{
		printf("%d ", hp.a[i]);
	}
	return 0;
}